<?php
namespace Pw\MainBundle\Form\DataTransformer;

use Symfony\Component\Form\DataTransformerInterface;
use Symfony\Component\Form\Exception\TransformationFailedException;
use Doctrine\Common\Persistence\ObjectManager;
use Doctrine\Common\Collections\ArrayCollection;

class TestTransformer implements DataTransformerInterface
{

    /*private $om;

    public function __construct(ObjectManager $om)
    {
        $this->om = $om;
    }*/
	public function transform($value) {
		
		$value->setUseCost(strval($value->getUseCost()));
		var_dump($value);
		//error_log("transform $value /n", 3, '/var/tmp/my-error.log');
		return $value;
	}
	
	public function reverseTransform($value) {
		error_log("reverse $value /n", 3, '/var/tmp/my-error.log');
		return $value;
	}
}
